From: Jasper St. Pierre Date: Wed, 12 Jun 2013 07:37:50 +0000 (-0400) Subject: network: Make sure that the network menu is insensitive when in the lock screen X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3849 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c8c839a5693e8493f12fc6787ab90721d052e1e0;p=gnome-shell.git network: Make sure that the network menu is insensitive when in the lock screen Since the network section of the aggregate menu will be shown in the lock screen, we need to ensure that users can't tweak with network settings or anything like that. https://bugzilla.gnome.org/show_bug.cgi?id=704670 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 1da477a3e..840c75823 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -713,6 +713,14 @@ const NMApplet = new Lang.Class({ this._client.connect('device-added', Lang.bind(this, this._deviceAdded)); this._client.connect('device-removed', Lang.bind(this, this._deviceRemoved)); this._settings.connect('new-connection', Lang.bind(this, this._newConnection)); + + Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); + this._sessionUpdated(); + }, + + _sessionUpdated: function() { + let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; + this._section.setSensitive(sensitive); }, _ensureSource: function() {